#ifndef TOOLS_PLOTTER_HPP
#define TOOLS_PLOTTER_HPP

#include <netinet/in.h>

#include <nlohmann/json.hpp>
#include <string>

#include "armor_detector/armor.hpp"

namespace rm_auto_aim
{
class Plotter
{
public:
  Plotter(std::string host = "127.0.0.1", uint16_t port = 9870);

  ~Plotter();

  void plot(const nlohmann::json & json);

  void sendArmorPosition(const std::vector<Armor> & armors);

  // Note: instance/state members belong to users of Plotter (e.g., nodes).
  // Plotter itself only provides the API to send data over network.

private:
  int socket_;
  sockaddr_in destination_;
};
}  // namespace rm_auto_aim

#endif  // TOOLS_PLOTTER_HPP